<%-- 
    Document   : yuyue
    Created on : 2017-3-22, 11:44:27
    Author     : chang
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
    <head>
        <meta charset="utf-8" />
        <title>预约详细信息</title>
        <meta name="format-detection" content="telephone=no" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <link type="text/css" rel="stylesheet"  href="<c:url value="/css/layout.css"/>" />
        <link rel="stylesheet" href="<c:url value="/css/weui.css" />"/>
        <link rel="stylesheet" href="<c:url value="/css/jquery-weui.css" />"/>
        <link rel="stylesheet" href="<c:url value="/css/example.css" />"/>
        <script type="text/javascript" src="<c:url value="/js/jquery-2.1.4.js"/>"></script>
        <script type="text/javascript" src="<c:url value="/js/jquery-weui.js"/>"></script>
        <script type="text/javascript" src="<c:url value="/js/frame-weui.js"/>" ></script>
        <style>
            body {
                margin: 0 auto;
                background: #f9f9f9;
            }
        </style>
    </head>

    <body>
        <div id="container3">
            <div class="alipay_yy">
                <form>
                    <div class="yuyue_list">
                        <label for="wdname">姓名</label>
                        <input type="text"  id="name" value="${yy.value.xm.value}" readonly="readonly">
                    </div>
                    <div class="yuyue_list">
                        <label for="khname">手机号</label>
                        <input type="text" id="phone" value="${yy.value.sjh.value}" readonly="readonly">
                    </div>
                    <div class="yuyue_list">
                        <label for="khname">车主身份证</label>
                        <input type="text" id="sfz"  value="${yy.value.sfzh.value}" readonly="readonly">
                    </div>
                    <div class="yuyue_list">
                        <label for="khname">车牌号</label>
                        <input type="text" id="cph"  value="${yy.value.cph.value}" readonly="readonly">
                    </div>
                    <div class="yuyue_list">
                        <label for="khname">车辆类型</label>
                        <input type="text" id="cllx" value="${yy.value.cllx_.value}" readonly="readonly">
                    </div>
                    <div class="yuyue_list">
                        <label for="khname">预约时间</label>
                        <input type="text"  value="${yy.value.yysj.value}" name="yysj" id="yysj" readonly="readonly">
                    </div>
                    <div class="yuyue_list">
                        <label for="khname">预约检测机构</label>
                        <input type="text"  id="jczmc" value="${yy.value.jczm.value}"  readonly="readonly">
                    </div>
                    <div class="yuyue_list">
                        <label for="khname">状态</label>
                        <input type="text"  id="zt" value="${yy.value.zt_.value}"  readonly="readonly">
                    </div>
                        <c:if test="${yy.value.pj.value!=null}">
                        <div class="yuyue_list">
                            <div for="khname" style="margin-left:10px">评价</div>
                                <div class="weui_cell_bd weui_cell_primary">
                                    <textarea class="weui_textarea" style="margin-left:10px"  placeholder="请输入评价" rows="2" id="pj" name="pj" readonly="readonly">${yy.value.pj.value}</textarea>
                                </div>
                            </div>
                        </c:if>
                        <c:if test="${yy.value.zt.value==1&&yy.value.pj.value==null}">
                            <div class="yuyue_list">
                            <div for="khname" style="margin-left:10px">评价</div>
                                <div class="weui_cell_bd weui_cell_primary">
                                    <textarea class="weui_textarea" style="margin-left:10px" placeholder="请输入评价" rows="2" id="pj" name="pj"></textarea>
                                </div>
			    </div>
                            <div class="alipay_yuyue" style="margin-bottom: 30px">
                                <input type="button" class="alipay_yuyue_an" value="评价" id="btn">
                            </div>
                        </c:if>
                </form>
            </div>
        </div>
    </body>
    <script>
        $(function(){
            $('#btn').click(function(){
                var lsh='${yy.value.lsh.value}';
                if($('#pj').val()===""){
                    $.toast("请输入评价！","forbidden");
                    return;
                }else{
                    var o = new AjaxOptions();
                    o.put("lsh",lsh);
                    o.put("service_code","S90008");
                    o.put("pj",$('#pj').val());
                    o.sus = function(data){
                        $.toast("评价成功！");
                        $('#name').val(data.yy.xm);
                        $('#phone').val(data.yy.sjh);
                        $('#sfz').val(data.yy.sfzh);
                        $('#cph').val(data.yy.cph);
                        $('#cllx').val(data.yy.cllx_);
                        $('#yysj').val(data.yy.yysj);
                        $('#jczmc').val(data.yy.jczmc);
                        $('#zt').val(data.yy.zt_);
                        $('#pj').val(data.yy.pj);
                        $('#pj').attr("readonly","readonly");
                        $('#btn').hide();
                    };
                    o.fal = function(code,desc){
                       $.toast("评价失败!", "cancel");
                    };
                    $.ajax(o);
                }
            });
            
        });
    </script>
</html>
